package com.footprint.common.httpclient;

import org.apache.http.message.BasicNameValuePair;

import com.footprint.common.util.Constants.HttpMethod;

public class CAHttpRequest extends BasicHttpRequest {

	public CAHttpRequest(String host, String protocol, String path,
			String action, HttpMethod httpMethod) {
		super(host, protocol, path, action, httpMethod);
		initializeCA();
	}
	
	private void initializeCA() {
		paramList.add(new BasicNameValuePair("tripType", "OW"));
		paramList.add(new BasicNameValuePair("searchType", "FARE"));
		paramList.add(new BasicNameValuePair("flexibleSearch", "false"));
		paramList.add(new BasicNameValuePair("directFlightsOnly", "false"));
		paramList.add(new BasicNameValuePair("fareOptions", "1.FAR.X"));
		//City from
		paramList.add(new BasicNameValuePair("outboundOption.originLocationCode", "PEK"));
		//City to
		paramList.add(new BasicNameValuePair("outboundOption.destinationLocationCode", "PVG"));
		//Departure day
		paramList.add(new BasicNameValuePair("outboundOption.departureDay", "16"));
		paramList.add(new BasicNameValuePair("outboundOption.departureMonth", "12"));
		paramList.add(new BasicNameValuePair("outboundOption.departureYear", "2011"));
		paramList.add(new BasicNameValuePair("outboundOption.departureTime", "NA"));
		//Adult
		paramList.add(new BasicNameValuePair("guestTypes[0].type", "ADT"));
		paramList.add(new BasicNameValuePair("guestTypes[0].amount", "1"));
		//Child
		paramList.add(new BasicNameValuePair("guestTypes[1].type", "CNN"));
		paramList.add(new BasicNameValuePair("guestTypes[1].amount", "0"));
		paramList.add(new BasicNameValuePair("pos", "AIRCHINA_CN"));
		paramList.add(new BasicNameValuePair("lang", "zh_CN"));
		//Infant
		paramList.add(new BasicNameValuePair("guestTypes[2].type", "INF"));
		paramList.add(new BasicNameValuePair("guestTypes[2].amount", "0"));
		super.initialize();
	}
}
